<?php
$this->breadcrumbs=array(
	$model->title,
);
$this->pageTitle=$model->title;
?>
<div class="page-header"></div>

<div class="article-content">
<?php if(0):?>
<?php $this->renderPartial('_view', array(
	'data'=>$model,
)); ?>

<?php endif;?>

<div id="comments">

	<?php if(0):?>
	<?php if($model->commentCount>=1): ?>
		<h3>
			<?php echo $model->commentCount>1 ? $model->commentCount . ' comments' : 'One comment'; ?>
		</h3>

		<?php $this->renderPartial('_comments',array(
			'post'=>$model,
			'comments'=>$model->comments,
		)); ?>
	<?php endif; ?>

	<h3><?php echo $model -> title;?></h3>

	<?php if(Yii::app()->user->hasFlash('commentSubmitted')): ?>
		<div class="flash-success">
			<?php echo Yii::app()->user->getFlash('commentSubmitted'); ?>
		</div>
	<?php else: ?>
		<?php $this->renderPartial('/comment/_form',array(
			'model'=>$comment,
		)); ?>
	<?php endif; ?>

	<?php endif;?>
<?php 
	$this->widget('comments.widgets.ECommentsListWidget', array(
    'model' => $comment_model,
));
?>

</div>
		<!-- comments -->

</div>

<div class="article-recommand">
	<p class="article-recommand-title">
		文章推荐
	</p>
	<p><a href="/post/1?title=Welcome%21">Welcome!</a></p>
	<p><a href="/post/2?title=Welcome%21">Welcome!</a></p>
	<p><a href="/post/3?title=A+Test+Post">A Test Post</a></p>
	<p><a href="/post/4?title=sdfasdffsd">sdfasdffsd</a></p>
	<p><a href="/post/5?title=dffffsdfsfsd">dffffsdfsfsd</a></p>
	<p><a href="/post/6?title=Test">Test</a></p>
</div>

